From: Marco Trevisan (TreviƱo) Date: Wed, 9 Jul 2025 03:56:27 +0000 (+0200) Subject: network: Make sortByName to properly handle null values X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~116^2^2~60 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=674cfd49f297dd438e5fcefc8ad2dbedeeda2af0;p=gnome-shell.git network: Make sortByName to properly handle null values g_utf8_collate is not nullable, but is used in a relevant piece of code, so better not to throw any error if a null value is compared Part-of: --- diff --git a/js/ui/status/network.js b/js/ui/status/network.js index 4cabfda65..96ca1ad02 100644 --- a/js/ui/status/network.js +++ b/js/ui/status/network.js @@ -116,7 +116,7 @@ class ItemSorter { } _sortByName(one, two) { - return GLib.utf8_collate(one.name, two.name); + return GLib.utf8_collate(one.name ?? '', two.name ?? ''); } _sortByMru(one, two) {